import request from "../utils/request"



export function fetchFile(url) {
    return request({
        url: url,
        method: "GET",
    })
}

export function fetchFolders(params) {
    return request({
        url: '/file/fetchFolders',
        method: 'POST',
        params: params,
    })
}

export function fetchFiles(params) {
    return request({
        url: '/file/fetchFiles',
        method: 'POST',
        params: params,
    })
}

export function fetchNoteInfo(params) {
    return request({
        url: '/article/fetchNoteInfo',
        method: 'POST',
        params: params,
    })
}

export function createArticleComment(data) {
    return request({
        url: "/article/sendComment",
        method: "post",
        data: data,
    })
}



export function fetchNoteComments(params) {
    return request({
        url: "/article/fetchComments",
        method: "post",
        params: params,
    })
}

export function login(params) {
    return request({
        url: "/manage/login",
        method: "post",
        params: params,
    })
}

export function fetchAllThing(params) {
    return request({
        url: "/file/fetchAllThing",
        method: 'POST',
        params: params
    })
}

export function uploadFile(params) {
    return request({
        url: "/file/uploadFile",
        method: 'POST',
        data: params,
    })
}

export function addFolder(params) {
    return request({
        url: "/file/addFolder",
        method: 'post',
        params: params,
    })
} 

export function deleteFile(params) {
    return request({
        url: "/file/delFile",
        method: 'post',
        params: params,
    })
}

export function fetchMovies(params) {
    return request({
        url: "/file/fetchFiles",
        method: 'post',
        params: params,
    })
}

export function uploadImage(data) {
    return request({
        url: "/image/uploadImage",
        method: "POST",
        data: data,
        timeout: 1000*60*60*60
    })
}


export function createMovieNote(data) {
    return request({
        url: "/movie/createMovieNote",
        method: "POST",
        data: data
    })
} 


export function getMovieNoteList(params) {
    return request({
        url: "/movie/getMoiveNoteList",
        method: "POST",
        params: params,
    })
}

export function createMovieNoteComment(data) {
    return request({
        url: "/movie/createMovieNoteComment",
        method: "post",
        data: data,
    })
}

export function getMovieNoteCommentListById(params) {
    return request({
        url: "/movie/getMovieNoteCommentListById",
        method: "POST",
        params: params
    })
}

export function getMovieNoteById(params) {
    return request({
        url: "/movie/getMovieNoteById",
        method: "POST",
        params: params
    })
}

export function updateFile(data) {
    return request({
        url: "/file/updateFile",
        method: "POST",
        data: data,
    })
}

export function getAllMessage(params) {
    return request({
        url: "/message/getAllMessage",
        method: "POST",
        params: params
    })
}

export function createMessage(data) {
    return request({
        url: "/message/createMessage",
        method: "POST",
        data: data
    })
}

export function delMessageById(params) {
    return request({
        url: "/message/delMessageById",
        method: "POST",
        params: params
    })
}

export function getAllMessageCommentById(params) {
    return request({
        url: "/message/getAllMessageCommentById",
        method: "POST",
        params: params
    })
}

export function createMessageComment(data) {
    return request({
        url: "/message/createMessageComment",
        method: "POST",
        data: data
    })
}

export function delMessageCommentById(params) {
    return request({
        url: "/message/delMessageCommentById",
        method: "POST",
        params: params
    })
}


export function getAllTableName() {
    return request({
        url: "/db/getAllTableName",
        method: "POST"
    })
}

export function getAllFildsList(params) {
    return request({
        url: "/db/getAllFildsList",
        method: "POST",
        params: params
    })
}

export function getAllRows(params) {
    return request({
        url: "/db/getAllRows",
        method: "POST",
        params: params
    })
}

export function delRowById(params) {
    return request({
        url: "/db/delRowById",
        method: "POST",
        params: params
    })
}